package com.itheima.object3;

public class Student {
    //1.私有化成员变量
    private String name;
    private int age;

    //2.无参构造方法
    public Student(){
    }

    //3.有参构造方法
    public Student(String name, int age){
        this.name = name;
        this.age = age;
    }

    //get/set方法
    public String getName(){
        return name;
    }
    public void setName(String name){
        this.name = name;
    }

    public int getAge(){
        return age;
    }
    public void setAge(int age){
        this.age = age;
    }

    public void show(){
        System.out.println(this.name + "..." + this.age);
    }
}
